<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>登录 - <{$setting.title}></title>
		<meta content="<{$setting.keywords}>"  name="keywords"/>
		<meta content="<{$setting.description}>" name="description"/>
		<link href="<{$weburl}>/templates/default/<{$setting.templates}>/css/user.css" rel="stylesheet" type="text/css"/>
		<script type="text/javascript" src="<{$weburl}>/static/js/jquery.js"></script>
		<script type="text/javascript" src="<{$weburl}>/static/js/Validform_v5.3.2_min.js"></script>
		<script type="text/javascript">
		$(document).ready(function() {
			//表单验证
			$(".loginform").Validform({
				tiptype:3
			});
		});
		</script>
	</head>
	<body>
    <{include file="default/`$setting.templates`/top.html"}>
    <!------头部---------->
    <div class="headw">
        <div class="head">
            <div class="logo"><a href="<{$weburl}>/"><{if $setting.logo<>''}><img src="<{$setting.logo}>" alt="<{$setting.sitename}>"><{else}><{$setting.sitename}><{/if}></a></div>

            <div class="carnum" id="carcount">
            </div>
        </div>
    </div>
		<!--内容-->

		<div class="login_main mt10">
			<div class="title">忘记密码</div>
			<div class="clearfix">
				<div class="login_left">
					<form name="loginform" class="loginform" method="post" action="<{$weburl}>/<{if $setting.ishtml==1}>pwd/<{else}>index.php?m=pwd<{/if}>">
						<table class="logintable mt20">
							<tr>
								<th>手机号：</th>
								<td id="mobilephone"><input type="text" name="mobilephone" class="inp01" ajaxurl="<{$weburl}>/index.php?m=pwd&ajax=1" datatype="s6-18" errormsg="请填写手机号！"/></td>
							</tr>
							<tr>
								<th width="20%">验证码：</th>
                                <td>
									<span class="fl">
                                        <input name="code"  type="text" class="inp02" datatype="s" nullmsg="请输入验证码！"/>
                                    </span>
                                    <span class="fl pt5">
                                        <botton class="checkcode" st="1">获取验证码</botton>
                                    </span>
                                </td>
							</tr>
							<tr>
								<th></th>
								<td><input type="submit" class="login_but" value="重置密码"><a href="<{$weburl}>/pwd/"></a> <input type="hidden" name="action" value="login"></td>
							</tr>
						</table>
					</form>
				</div>
				<div class="login_right">
					<p class="f14 mt20"><{$setting.sitename}></p>
					<p class="mt20"><a href="<{$weburl}>/<{if $setting.ishtml==1}>register/<{else}>index.php?m=register<{/if}>" class="register_but">我要注册</a></p>
				</div>
			</div>
		</div>
		<!--版权-->
		<{include file="default/`$setting.templates`/foot.html"}>
	</body>
</html>
<script>

    var wait = 120;
    function time(o) {
        if (wait == 0) {
            o.html('重新获取验证码');
            o.attr('st',1);
            wait = 120;
        } else {
            o.html("发送中...(" + wait + ")");
            o.attr('st',2);
            wait--;
            setTimeout(function () {
                        time(o)
                    },
                    1000)
        }
    }
    $('.checkcode').click(function () {
        var tel = $("input[name='mobilephone']").val();
        var url = "<{$web_domain}>/index.php?m=sms";
        if($(this).attr('st')==1){
            if(!tel){
                alert('请填写手机号');
                return false;
            }
            if(!$('#mobilephone .Validform_checktip').hasClass('Validform_right')){
                alert('手机号验证失败');
                return false;
            }
            $.post(url, { mobile: tel, a: "pwd",type:2 },
                    function(data){
                        if(data.succ==='false'){
                            alert(data.msg);
                        }else{
                            time($('.checkcode'));
                        }
                    },"json");

        }
    })

</script>